﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WeberMadeiras.Classes;

namespace WeberMadeiras
{
    public partial class About : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack) {
                carregarDados();
            }

        }

        private void carregarDados()
        {
            List<Mourao> usuarios = new List<Mourao>();

            for (int i = 2; i < 10; i= i +2)
            {
                Mourao m = new Mourao();
                m.Comprimento = i;
                if( i%3==0)
                m.Diametro = "8 a 10";
                else m.Diametro = "6 a 9";
                usuarios.Add(m);
            }

            gvwCercas.DataSource = usuarios;
            gvwCercas.DataBind();
        }
    }
}